/*******************************************************************************
* Copyright (c) 2010, 2017 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.qinyeit.serviceapp.entity.enums.PrintSettingOrderType;
import lombok.Builder;
import lombok.experimental.Tolerate;


import javax.persistence.*;

/**
 * ClassName: PrintSettingOrderDetail <br/>
 * Function: 单据打印设置明细 <br/>
 * date: 2018-07-05 11:50:24 <br/>
 *
 * @author 马飞月
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="print_setting_order_details")
public class PrintSettingOrderDetail extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 所属单据打印设置
	@ManyToOne
	@JoinColumn(name="print_setting_order_id")
	@JsonIgnore
	private PrintSettingOrder printSettingOrder = null;

	// 打印类型 (总部订单/总部入库/总部出库/总部调拨/总部盘点/...)
    @Column(name="print_type")
	@Enumerated(EnumType.STRING)
	private PrintSettingOrderType printType;

	// 单据标题 (如: 销售出库单)
    @Column(name="title", length = 100)
	private String title = "";

	// 单据底部说明 (如: 请贵公司收到物品后及时清点)
    @Column(name="order_explain", length = 500)
	private String orderExplain = "";

	@Tolerate
	public PrintSettingOrderDetail() {
		
	}
	@Tolerate
	public PrintSettingOrderDetail(Long id){
		super.setId(id);
	}


    public PrintSettingOrder getPrintSettingOrder() {
        return printSettingOrder;
    }

    public void setPrintSettingOrder(PrintSettingOrder printSettingOrder) {
        this.printSettingOrder = printSettingOrder;
    }

    public PrintSettingOrderType getPrintType() {
        return printType;
    }

    public void setPrintType(PrintSettingOrderType printType) {
        this.printType = printType;
    }

	
	/**
	 * 获取单据标题
	 */
	public String getTitle() {
		return this.title;
	}

    /**
     * 设置单据标题
     */
	public PrintSettingOrderDetail setTitle(String title) {
		this.title = title;
		return this;
	}

	/**
	 * 获取单据底部说明
	 */
	public String getOrderExplain() {
		return this.orderExplain;
	}

    /**
     * 设置单据底部说明
     */
	public PrintSettingOrderDetail setOrderExplain(String orderExplain) {
		this.orderExplain = orderExplain;
		return this;
	}

}
